<template>
    <div class="return-order">
        <search-form :searchArray="searchArray"></search-form>
        <div class="table-box">
            <div class="title">
                应退总金额:￥108,950.92应退总红包:￥0.00应退总金币:￥94.00
                <div class="control">
                    <el-button type="primary" @click="createShowDialog.show = true">创建退货单</el-button><el-button>导出Excel</el-button>
                </div>
            </div>
            <elTable :formData="formData" @tableData="getList" ref="dataInfo">
                    <el-table-column prop="name" label="订单号" align="center"></el-table-column>
                    <el-table-column prop="group" label="药店名称" align="center"></el-table-column>
                    <el-table-column prop="group" label="供应商认证" align="center"></el-table-column>
                    <el-table-column prop="group" label="店铺" align="center"></el-table-column>
                    <el-table-column prop="loginTime" label="订单金额" align="center"></el-table-column>
                    <el-table-column prop="loginTime" label="优惠" align="center"></el-table-column>
                    <el-table-column prop="loginTime" label="其它优惠" align="center"></el-table-column>
            </elTable>
        </div>
        <dialogs 
           :visible="createShowDialog" 
           width="800px"
           title="创建退货单"
           >
            <search-form :searchArray="createSearch"></search-form>
            <elTable :formData="formData" @tableData="getList" ref="dataInfo">
                    <el-table-column prop="name" label="订单号" align="center"></el-table-column>
                    <el-table-column prop="group" label="付款时间" align="center"></el-table-column>
                    <el-table-column prop="group" label="订单状态" align="center"></el-table-column>
                    <el-table-column prop="group" label="订单类型" align="center"></el-table-column>
                    <el-table-column prop="loginTime" label="付款方（药店）" align="center"></el-table-column>
                    <el-table-column prop="loginTime" label="订单总金额" align="center"></el-table-column>
                    <el-table-column prop="loginTime" label="付款总金额" align="center"></el-table-column>
                    <el-table-column prop="action" label="操作" align="center">
                        <template slot-scope="">

                        </template>
                    </el-table-column>
            </elTable>
        </dialogs>
    </div>
</template>
<script>
import elTable from "@/components/xForm/elTable"
export default {
    name: 'returnOrder',
    components: {
        elTable
    },
    data () {
        return {
            createShowDialog: {show: false},
            createSearch: [
                {
                    type: 'input',
                    value: '',
                    label: '订单编号',
                    placeholder: '请输入订单编号'
                },
                {
                    type: 'input',
                    value: '',
                    label: '药店名称',
                    placeholder: '请输入药店名称'
                }
            ],
            formData: {
                name: "",
                userName: "",
                userStatus: "",
                currentPage: 1,
                pageSize: 10,
            },
            searchArray: [
                {
                    type:'input',
                    placeholder: '请输入经退货单',
                    value: '',
                    label: '退货单',
                },
                {
                    type:'input',
                    placeholder: '请输入经管编号',
                    value: '',
                    label: '经管编号',
                },
                {
                    type:'input',
                    placeholder: '请输入原始订单',
                    value: '',
                    label: '原始订单',
                },
                {
                    type: "select",
                    placeholder: "请选择提现类型",
                    filterable: false,
                    value: "",
                    width: '',
                    label: '提现类型',
                    list: [
                    {
                        label: "",
                        value: ""
                    }
                    ]
                },
            ]
        }
    },
    methods: {
        getList(pageNo) {
            let dataInfo = [
                {
                    id: 1,
                    name: "你好",
                    createTime: '1595244696000'
                },
                {
                    id: 2,
                    name: "你好1",
                    createTime: '1595244696000'
                },
            ];
            let total = 10;
            this.$nextTick(() => {
                this.$refs.dataInfo.loadData(dataInfo, total);
            });
        },
    }
}
</script>
<style lang="scss" scoped>
.return-order {
    .table-box {
        margin-top: 16px;
        .title {
            padding-bottom: 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
    }
}
</style>